
<template>
  <div class="grade1 base-background-img">
    <ul class="ul-item-content">
      <li class="li-item-content" v-for='(item, index) in tabs' :key="index" :class="{'active': item.isSelected}" @click="swiper(item)">
        <img style="width:260px;height:51px;" :src="item.img" alt="">
      </li>
    </ul>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  import STATICPATH from '../../config.js'
  export default {
    name: 'grade4',
    data () {
      return {
        isshowpdf: false,
        ishsowvideo: false,
        info: '',
        infourl: '',
        tabs: [{
          img: 'static/robot/1x/1-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——楼梯靠右走.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/2-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——我的杯子.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/3-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——数字宝宝456.pdf',
          data: [{
            isSelected: 1,
            name: '数字456',
            url: STATICPATH + '/robot/4/大颗粒/数字456.mp4'
          }]
        },
        {
          img: 'static/robot/1x/4-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——创意存钱罐.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/5-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——幻彩宝剑.pdf',
          data: [{
            isSelected: 1,
            name: '找不到的宝剑',
            url: STATICPATH + '/robot/4/大颗粒/找不到的宝剑.mp4'
          }]
        },
        {
          img: 'static/robot/1x/6-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——神奇魔法棒.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/7-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——我的超人爸爸.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/8-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——小猪的家.pdf',
          data: [{
            isSelected: 1,
            name: '三只小猪',
            url: STATICPATH + '/robot/4/大颗粒/三只小猪.mp4'
          }]
        },
        {
          img: 'static/robot/1x/9-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——呆萌机器人.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/10-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——小小的船.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/11-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——我的小天地.pdf',
          data: []
        },
        {
          img: 'static/robot/1x/12-1.png',
          url: 'static/robot/pdf/4/【课程讲义】——夏日狂想曲.pdf',
          data: []
        }]
      }
    },
    methods: {
      swiper: function (item) {
        console.log(item)
        this.info = item.data
        this.pdfurl = item.url
        this.isshowpdf = true
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.grade1 > div {
  position: absolute; 
}
.ul-item-content {
  margin: 0;
  padding: 0;
  list-style-type: none;
  z-index: 10;
  top: 230px;
  left: 190px;
  width: 910px;
  height: 480px;
  position: absolute;
}
.li-item-content {
  cursor: pointer;
  float: left;
  margin: 15px 20px;
  position: initial;
}
</style>
